syncthing: fix maxprocs config option name
authorGeorge Sapkin <[email protected]>
Sat, 1 Nov 2025 00:38:10 +0000 (02:38 +0200)
committerHannu Nyman <[email protected]>
Sat, 1 Nov 2025 06:29:11 +0000 (08:29 +0200)
Map old config option "macprocs" to new one.

Signed-off-by: George Sapkin <[email protected]>
utils/syncthing/Makefile
utils/syncthing/files/syncthing.conf
utils/syncthing/files/syncthing.init

index 9b8621c1dfc792b2f18617874d673ae3e1372f4d..071d2fa66959529858ca27e766ebe75b556fcdfd 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=syncthing
 PKG_VERSION:=2.0.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)
index 51b18f9d66e74d0c7d504b296ca7125375a8c169..2c1b6d0e2ec9ef9e105dd12545722d05b722fc30 100644 (file)
@@ -16,7 +16,7 @@ config syncthing 'syncthing'
 
        # 0 to match the number of CPUs (default)
        # >0 to explicitly specify concurrency
-       option macprocs '0'
+       option maxprocs '0'
 
        # More info: https://docs.syncthing.net/users/syncthing.html
        # option db_delete_retention_interval ''
index f51dc32b52708a96a4eb6fbc54dee0b540c61761..b50abf74f41faa9c59618c2e76534f9aaa8a832c 100644 (file)
@@ -21,6 +21,10 @@ config_cb() {
                        option='log_file'
                        ;;
 
+               macprocs)
+                       option='maxprocs'
+                       ;;
+
                esac
 
                eval $option="$value"
@@ -44,7 +48,7 @@ start_service() {
        local log_level='INFO'
        local log_max_old_files=7
        local log_max_size=1048576
-       local macprocs=0
+       local maxprocs=0
        local nice=0
        local user='syncthing'
 
@@ -58,16 +62,16 @@ start_service() {
        # A separate step to handle an upgrade use case
        [ -d "$home" ] && chown -R $user:$group "$home"
 
-       # Changes to "niceness"/macprocs are not picked up either by reload_config
+       # Changes to "niceness"/maxprocs are not picked up either by reload_config
        # or by restart: the service has to be stopped/started for it to take effect
-       if [ $macprocs -le 0 ]; then
+       if [ $maxprocs -le 0 ]; then
                # Default to the number of cores in this case
-               macprocs=$(grep -c ^processor /proc/cpuinfo)
+               maxprocs=$(grep -c ^processor /proc/cpuinfo)
        fi
 
        procd_open_instance
        procd_set_param command "$PROG"
-       procd_set_param env GOMAXPROCS="$macprocs"
+       procd_set_param env GOMAXPROCS="$maxprocs"
        procd_append_param command serve
        [ -z "$db_delete_retention_interval" ] || \
                procd_append_param command --db-delete-retention-interval="$db_delete_retention_interval"